package com.union.core.job.service;

import java.util.List;

import org.apache.log4j.Logger;

import com.union.core.job.dao.impl.DailyJobDaoImpl;
import com.union.core.job.model.DailyJob;


public class DailyJobService {
	private static Logger log = Logger.getLogger(DailyJobService.class.getName());
	private DailyJobDaoImpl dailyJobDaoImpl;
	public DailyJobService(){
		 dailyJobDaoImpl=new DailyJobDaoImpl();
	}
	public boolean addJob(DailyJob job){
		boolean flag = dailyJobDaoImpl.addJob(job);
    	log.info("添加任务: "+job.getJOB_NAME()+"flag="+flag);
    	return flag;
	}
	public boolean editJob(DailyJob job){
		boolean flag = dailyJobDaoImpl.editJob(job);
    	log.info("添加任务: "+job.getJOB_NAME()+"flag="+flag);
		return flag;
	}
	public List<DailyJob> getJobList(String startDate, String endDate,
			int status, int orgId, int staffId, String queryType,
			String queryData,String orderByName, int start, int PageSize){
		List<DailyJob> jobList=dailyJobDaoImpl.getJobList(startDate, endDate, status,
				orgId, staffId, queryType, queryData, orderByName, start, PageSize);
		return jobList;
	}
	public int getJobListCount(String startDate, String endDate, int status,
			int orgId, int staffId, String queryType,
			String queryData){
		int count=dailyJobDaoImpl.getJobListCount(startDate, endDate, 
				status, orgId, staffId, queryType, queryData);
		return count;
	}
}
